package climspace.ejb;

import org.hornetq.utils.json.JSONObject;

public class JsonOutputFormat implements OutputFormatInterface {

	@Override
	public String objectToText(WeatherDataOutput weatherDataOutput) {
		if(weatherDataOutput!=null){
		JSONObject jsonObject = new JSONObject(weatherDataOutput);
		return jsonObject.toString();
		} else {
			return (new JSONObject().toString()); 
		}
	}
}
